package org.example

import org.example.org.example.DatabaseDriverFactory
import org.example.org.example.PersonService
import org.example.org.example.api.RocketLaunchService
import org.example.org.example.appModule
import org.koin.core.context.startKoin


suspend fun main() {

    startKoin {
        modules(appModule)
    }

//    PersonService().insertPerson("Leil", 35)
    val people = PersonService().selectAllPeople()
    for (person in people) {
        println("Name: ${person.name}, Age: ${person.age}")
    }

//    这种方式无法获取依赖，因为get()只能在KoinComponent中调用
//    val personRepository: PersonRepository = get()


    RocketLaunchService().getRocketLaunches().forEach { it -> println(it) }


}



